package com.yc.chaoshi.cs_order.controller;


import com.yc.chaoshi.cs_order.mapper.PmsFenlei1Mapper;
import com.yc.chaoshi.cs_order.mapper.PmsFenlei2Mapper;
import com.yc.chaoshi.entity.PmsFenlei1;
import com.yc.chaoshi.entity.PmsFenlei2;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xz
 * @since 2022-08-04
 */
@RestController
@RequestMapping("/chaoshi/pmsFenlei2")
public class PmsFenlei2Controller {
    @Resource
    private PmsFenlei2Mapper pmsFenlei2Mapper;

//    // 热门商品查询
//    @RequestMapping("queryAll2")
//    List<PmsFenlei2> queryAll2(){
//        return pmsFenlei2Mapper.selectSeconds();
//    }



    @RequestMapping("queryAll1")
    List<PmsFenlei1> queryAll1(@RequestParam int aid){
        return pmsFenlei2Mapper.selectAll1(aid);
    }

    @RequestMapping("findByBid")
    public PmsFenlei2 findById(@RequestParam int bid){
        return pmsFenlei2Mapper.selectById(bid);
    }

    @RequestMapping("queryAll2")
    List<PmsFenlei2> queryAll2(@RequestParam int bid){
        return pmsFenlei2Mapper.selectAll2(bid);
    }


}

